﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using TestSystem.Model.Data.Repositories;
using TestSystem.Model.Exceptions;
using TestSystem.Model.Resources;
using TestSystem.Ui.Helpers;

namespace TestSystem.Ui.Forms
{
    public partial class GetFolderForm : Form
    {
        public String Value
        {
            get { return textBoxText.Text; }
            set { textBoxText.Text = value; }
        }
        

        public GetFolderForm()
        {
            DialogResult = DialogResult.Cancel;
            InitializeComponent();
        }

        public DialogResult ShowDialog(String title, String message)
        {
            labelMessage.Text = message;
            Text = title;
            
            return ShowDialog();
        }
        public DialogResult ShowDialog (String title, String message, String name)
        {
            textBoxText.Text = name;
            labelMessage.Text = message;
            Text = title;
            return ShowDialog();    
        }

        private void OnCancelClick(object sender, EventArgs e)
        {
            Close();
        }

        private void OnOkClick(object sender, EventArgs e)
        {
            DialogResult = DialogResult.OK;
            Close();
        }
    }
}
